local skel = fk.CreateSkill {
  name = "emo__seyu",
}

Fk:loadTranslationTable{
  ["emo__seyu"] = "色欲",
  [":emo__seyu"] = "出牌阶段限一次，你可以令一名角色获得三张<font color='#CC3131'>♥</font>牌，然后令其失去一点体力，你回复一点体力，若其中有【桃】，视为未发动。",
  ["#emo__seyu-prompt"] = "色欲：令一名角色获得三张<font color='#CC3131'>♥</font>牌，其失去一点体力，你回复一点体力",
}

skel:addEffect("active", {
  anim_type = "control",
  prompt = "#emo__seyu-prompt",
  card_num = 0,
  target_num = 1,
  card_filter = Util.FalseFunc,
  target_filter = function(self, to_select, selected)
    return #selected == 0
  end,
  times = function (self, player)
    return 1 - player:usedSkillTimes(skel.name, Player.HistoryPhase)
  end,
  can_use = function(self, player)
    return player:usedSkillTimes(skel.name, Player.HistoryPhase) == 0
  end,
  on_use = function(self, room, effect)
    local player = effect.from
    local to = effect.tos[1]
    local ids = room:getCardsFromPileByRule(".|.|heart", 3, "allPiles")
    if #ids > 0 then
      room:moveCardTo(ids, Player.Hand, to, fk.ReasonPrey, skel.name, nil, true)
      if table.find(ids, function(id) return Fk:getCardById(id).trueName == "peach" end) then
        player:setSkillUseHistory(skel.name, 0, Player.HistoryPhase)
      end
    end
    if not to.dead then
      room:loseHp(to, 1, skel.name)
    end
    if not player.dead and player:isWounded() then
      room:recover { num = 1, skillName = skel.name, who = player, recoverBy = player }
    end
  end,
})

return skel
